CKG: Improving ABSA with text augmentation using ChatGPT and knowledge-enhanced gated attention graph convolutional networks

Aspect-level sentiment analysis (ABSA) is a pivotal task within the domain of neurorobotics, contributing to the comprehension of fine-grained textual emotions. Despite the extensive research undertaken on ABSA, the limited availability of training data remains a significant obstacle that hinders the performance of previous studies. Moreover, previous works have predominantly focused on concatenating semantic and syntactic features to predict sentiment polarity, which inadvertently severed the intrinsic connection. Several studies have attempted to utilize multi-layer graph convolution for the purpose of extracting syntactic characteristics. However, this approach has encountered the issue of gradient explosion. This paper investigates the possibilities of leveraging ChatGPT for aspect-level text augmentation. Furthermore, we introduce an improved gated attention mechanism specifically designed for graph convolutional networks to mitigates the problem of gradient explosion. By enriching the features of the dependency graph with a sentiment knowledge base, we strengthen the relationship between aspect words and the polarity of the contextual sentiment. It is worth mentioning that we employ cross-fusion to effectively integrate textual semantic and syntactic features. The experimental results substantiate the superiority of our model over the baseline models in terms of performance.


Introduction
In recent years, with the pervasive utilization of social media and online reviews, individuals have been afforded greater opportunities to articulate their emotions on the internet [1].These expressions of emotion not only involve overall sentiment polarity determination but also encompass specific aspects of emotions.This presents new challenges for neurorobotics in understanding textual emotions at a more intricate level.Therefore, research on ABSA has become increasingly important.ABSA is a branch of sentiment analysis that aims to identify and analyze the sentiment orientation towards specific aspects or targets in text.As shown in the Fig 1, in product reviews, users may have different sentiment evaluations for different aspects of the product, such as performance, design, price, and so on.Understanding these aspect-level sentiment information can help companies gain insights into consumer satisfaction with different aspects, thereby improving products and providing better user experiences.However, ABSA faces several challenges.Aspect identification is a critical issue because aspects are often specific entities, attributes, or viewpoints that are contextually related [2].Furthermore, ABSA needs to consider the sentiment expressions associated with different aspects in the text, such as positive, negative, or neutral sentiments.The challenge in this multi-label classification problem lies in accurately capturing the sentiment information related to aspects.Additionally, sentiment expressions in the text may be implicit or ambiguous, requiring context understanding and inference.
Most of the early work on ABSA utilized neural network models to extract sentiment information from the given aspect in context.Although earlier models based on temporal models [3][4][5][6] and attention mechanisms [7,8] have achieved certain effectiveness, they still face several challenges, including the scarcity of sufficient training data, imbalanced data distribution, and limitations in the generalization and practical applicability of existing models.Consequently, the analysis of syntax has gradually gained increasing attention, as shown in the Fig 2 .In addition, existing methods still need improvement in handling grammatical and semantic learning abilities, as well as effectively linking aspect words, context, and multiple network features.
The scarcity of training data and the imbalanced distribution of data present significant challenges in ABSA.Obtaining domain-specific data is often a complex task, resulting in limited training data size.This limitation can undermine the generalization ability of the models, hindering their performance across diverse scenarios.Furthermore, the uneven distribution of data introduces instability in model performance when confronted with various aspect and sentiment expressions.Moreover, existing methods exhibit limitations in their grammatical and semantic learning abilities.Traditional attention mechanisms excel at extracting semantic information but struggle with handling grammatical nuances effectively.Conversely, methods solely reliant on grammar dependency trees fail to capture the contextual information of aspect words adequately.As a result, the model's understanding capability within complex contexts becomes restricted.Addressing these limitations is imperative to enhance the grammatical and semantic learning abilities of ABSA models.To tackle the aforementioned challenges, this study presents the CKG (Aspect-Level Sentiment Analysis with Text Augmentation using ChatGPT and Knowledge-Enhanced Gated Attention Graph Convolutional Network) model.The CKG model employs a graph convolutional neural network to analyze sentences, leveraging sentiment knowledge from SenticNet to amplify the influence of aspect words on sentiment polarity within the sentence's dependency graph.Furthermore, the model incorporates gate attention mechanisms to update nodes.In comparison to conventional graph neural networks, the CKG model exhibits enhanced efficiency and superior performance.Additionally, we streamline the attention mechanism by employing relative position encoding to extract semantic information, thereby effectively handling the relative relationships of positional information within sequences.
Furthermore, before the final sentiment prediction output, we employ cross-fusion to integrate the final outputs of the sequence module and the graph convolution module.Compared to previous concatenation or summation methods, this approach not only improves the model's performance but also enhances its interpretability.In summary, CKG not only pays attention to the syntactic dependency of texts but also effectively combines the semantic features of neighboring nodes, thereby enhancing the model's understanding of text semantics and grammatical structures.
The main contributions of our work can be summarized as follows: • A method is proposed to expand text data based on the original dataset using ChatGPT.
• A graph convolutional network with gate attention mechanisms is introduced, which enhances the aspect features of the original sentence by incorporating syntactic dependency trees and an external knowledge base.This ensures the full consideration of the connection between the original sentence and aspect words, avoiding the loss of information.
• We propose a CKG model, which integrates syntactic and semantic features through crossfusion, and its effectiveness in ABSA tasks has been demonstrated on five benchmark datasets.

Aspect-based sentiment analysis
Aspect-based sentiment analysis (ABSA) is an important research direction in the field of sentiment analysis.Its goal is to identify and analyze the sentiment inclination towards specific aspects or targets in the text.This task is more fine-grained, judging the sentiment polarity of the text based on specific aspect words.Compared to document-level or sentence-level sentiment analysis, ABSA is more reasonable and practical [9].The key to ABSA is to accurately identify and analyze the sentiment inclination towards specific aspects or targets in the text.ABSA needs to focus on aspect words and sentiment words in the text and understand the relationship between them.When conducting sentiment analysis, it is necessary to consider the semantic information of the context and the complexity of the sentiment expression.Traditional machine learning algorithms require manual design and selection of features, such as word bag models and n-gram features.The selection of these features may be influenced by subjective factors and cannot fully capture the semantic information of the text.In addition, these methods require a large amount of annotated data to train the model, and the acquisition cost of annotated data is high.When the dataset changes, the performance of the methods is also greatly affected [10].Therefore, at the current stage, this technology is basically only used as a research reference.
With the advancement of deep learning technology, models based on Convolutional Neural Networks (CNN) and Recurrent Neural Networks (RNN) have been widely used in this task.These models can learn richer feature representations from the text and capture the complex relationship between sentences and aspects.In addition, the development of word embedding techniques, such as Word2Vec [11], PV [12], and GloVe [13], has also promoted the progress of deep learning in sentiment analysis tasks.Long Short-Term Memory (LSTM), a variant of Recurrent Neural Network (RNN), is widely used in sentiment analysis tasks, especially in solving the problem of long-term dependencies in time sequences.However, traditional LSTM has some limitations, such as being difficult to train in parallel and ineffective in handling the joint relationship between context information and aspect words in ABSA, ignoring their intrinsic connection.

Attention mechanism in aspect-based sentiment analysis
In recent years, attention mechanisms have received considerable attention in ABSA research because they can capture the relationship between aspects and sentiments and place them in a context [14].Attention mechanisms allow models to focus on relevant parts of the text when generating sentiment predictions, effectively handling long and context-rich sentences.By assigning different weights to each word or phrase, attention mechanisms can emphasize the most informative aspects, improving overall sentiment classification performance.
Some studies have explored the application of attention mechanisms in ABSA and achieved good results.For example, researchers have proposed using self-attention mechanisms to capture the importance of different words in aspect-related contexts [15].This technique allows the model to assign higher weights to words related to specific aspects, thereby improving ABSA.In addition, hierarchical attention mechanisms [16] have been used to capture sentiment information at different granularity levels.By assigning attention weights at the word level and aspect level, it can effectively capture the sentiment expressed for each aspect and aggregate the information for final sentiment prediction.This approach has shown better performance in capturing subtle differences in fine-grained sentiment.
Despite the notable achievements of attention mechanisms in ABSA, several challenges persist that necessitate attention and resolution.One such challenge pertains to the limited interpretability of attention weights.While attention mechanisms offer insights into the significance of different words or phrases, elucidating the precise reasoning process underlying the assigned weights often proves arduous.Techniques aimed at enhancing the interpretability of attention weights can significantly contribute to understanding the decision-making process of the model.It is noteworthy that the resilience of attention mechanisms against noise and ambiguous inputs remains an open question.Noise inputs encompassing spelling errors, grammatical inaccuracies, or informal language usage can potentially impede the accurate allocation of attention weights and hinder the capture of relevant sentiment information.Research dedicated to developing attention mechanisms resilient to such noise is indispensable for practical applications.

GNN in aspect-based sentiment analysis
To address the limitations of attention mechanisms in ABSA, research based on Graph Neural Networks (GNN) has received widespread attention in the ABSA field.GNN has the ability to model complex relationships and capture contextual information [17], making it a significant application in ABSA.GNN provides a powerful framework for integrating syntactic and semantic information, allowing models to better understand the sentiments expressed for different aspects.Some studies have explored the application of GNN in ABSA and achieved promising results.Researchers have proposed methods that represent text data as a graph, where aspects and related sentiments are represented as nodes, and their relationships are modeled as edges.By leveraging GNN [18], these models can capture the interactions between aspects and sentiments, thereby improving sentiment analysis performance.Zhang et al. [19] have developed the Tree Communication Model (TCM), which uses graph convolutional networks and recurrent graph neural networks to construct a tree structure based on syntactic parsing results.This model achieves better performance in text sentiment classification by capturing the relationships between nodes in a more comprehensive way.Building on this idea, Zhou et al. [20] have improved the syntax tree structure by learning a tree structure centered on aspects to shorten the distance between aspects and corresponding opinion words, showing good results through experiments.In order to further enhance the impact of aspect words on graph network construction and their relevance to the context, some works [21,22] have attempted to introduce external knowledge bases to increase the importance of aspect words in constructing graph networks.However, although progress has been made in applying GNN in ABSA, there are still some unresolved research questions, such as how to effectively integrate external knowledge into graph networks, how to effectively apply attention mechanisms to improve the understanding of graph networks, and how to avoid the problem of gradient explosion during training.
In this paper, we propose a Graph Convolutional Network (GAGCN) with gate-controlled attention mechanisms that focus the network's attention on nodes crucial for ABSA, thereby improving the model's performance.Furthermore, we introduce SenticNet [23], a sentiment knowledge base, to enhance the weights of aspect nodes and their related words, ensuring that the model's attention is focused on aspect words and their corresponding sentiment tendencies.Additionally, this method can effectively handle multi-label tasks and achieve sentiment analysis for multiple aspects by assigning different attention weights to different aspects.Experimental results show that the proposed model, which combines sentiment knowledge enhancement and an adaptive attention mechanism, performs better.

Overview of ChatGPT
The rapid development of artificial intelligence has brought many exciting technological breakthroughs, one of which is ChatGPT (Chat-based Generative Pre-trained Transformer) [24].ChatGPT is a deep learning-based natural language processing model with a wide range of applications and profound impact.It can understand and generate natural language text, making human-computer interaction more natural and fluent.ChatGPT and related models have achieved remarkable results in natural language processing tasks through pre-training and fine-tuning methods.By learning language patterns and semantic information from largescale corpora, they can generate accurate, coherent, and meaningful answers.
As an innovative natural language processing technology, ChatGPT has a wide range of applications in many fields [25].First, it plays an important role in virtual assistants and customer services.ChatGPT can interact with users in real-time as an intelligent conversational system, providing personalized information and answering questions.In the field of education, ChatGPT can serve as a personalized learning companion, offering question answering, learning materials, and guidance to improve learning outcomes and engagement [26].ChatGPT is also applied in areas such as intelligent customer support, automated text generation, information retrieval, and smart homes, providing people with convenient and intelligent services.
The emergence of ChatGPT brings significant value and impact.It provides a new way of human-computer interaction, allowing users to have more freedom in conversation with computers and enjoy personalized services and customized experiences.Intelligent answering and recommendation systems of ChatGPT can provide users with accurate and high-quality information, improving the efficiency and accuracy of information retrieval.Additionally, ChatGPT provides an important tool for researchers in language learning and natural language processing, promoting the development and innovation in these fields.
Despite the significant progress of ChatGPT, there are also negative evaluations and potential issues [27].Due to its training on large-scale datasets, ChatGPT may have problems related to information bias and implicit bias.Furthermore, ChatGPT may encounter difficulties in handling complex questions and understanding context, leading to inaccurate answers or lack of logical reasoning.The application of ChatGPT has also raised concerns about ethics and privacy, such as privacy protection of user data and potential risks of misuse.This paper mainly uses ChatGPT for text data augmentation based on the original dataset and does not involve sensitive issues.

Methods
In this section, we provide a detailed explanation of the proposed graph attention convolutional network, which utilizes ChatGPT for data augmentation and incorporates sentiment knowledge enhancement and gate mechanism.We also provide an introduction to the various details of the overall model.

Overview
As shown in the Fig 3, our proposed model consists of two main components: (1) learning contextual representations using BiLSTM or BERT, which takes the embedding matrix of each sentence as input and outputs the contextual feature representation of the sentence.( 2) Feature extraction of the syntactic dependencies of the sentences, where the enhanced representations of the sentences are inputted through the sentiment knowledge base and further feature extraction is performed using the graph attention convolutional network with incorporated gate mechanism.(3) The sentence features obtained from (1) and aspect features are enhanced using the self-attention mechanism with relative positional encoding.The graph information outputted by GAGCN is also fused to extract important sentiment dependencies related to specific aspects.Previous methods that solely relied on sequence networks or attention-based methods to analyze global semantics and aspect features failed to effectively link aspect words with underlying syntactic features of the original text.In addition, most models that employed graph convolutional neural networks only analyzed the syntactic dependencies and overlooked the aspect-sentiment connections contained in the semantic information of the text.Our proposed approach addresses these two shortcomings and strengthens the influence of aspects on the sentence sentiment, thereby improving the accuracy and interpretability of sentiment polarity output.

Definition
Aspect-level sentiment classification tasks typically involve preparing an input sequence for the model consisting of a context sequence and an aspect sequence.This input format enables the model to learn the relationship between the context and the aspect term.Assuming that the context sequence containing the input aspect term is denoted by s = {w 0 , w 1 , . .., w n }, it contains n + 1 words, including the target aspect term.The target aspect sequence is represented as s t ¼ fw t 0 ; w t 1 ; . . .; w t m g and is a subsequence of s composed of m(m � 1) words.The objective of aspect-based sentiment analysis is to determine the sentiment polarity related to the aspect based on the given sentence and aspect term.

Data augmentation using ChatGPT
ChatGPT is developed based on the research of GPT [28], GPT-2 [29], and GPT-3 [30].Its core idea is to incorporate a reinforcement learning model into GPT-3 to fine-tune the model's output to be more reasonable, accurate, truthful, and harmless [31].During the pre-training phase of ChatGPT, an unsupervised task is performed where input samples are denoted as X = {x 1 , x 2 , . .., x n }, x i = (s 1 , s 2 , . .., s m ).The Transformer model is trained to obtain corresponding tokens and their associated positional encodings.Representing the trainable parameters as θ, the ultimate goal of the pre-training phase is to maximize the following Eq 1: After pre-training, a reinforcement learning model with human feedback is used to finetune the pre-trained model.Human experts are involved in constructing and evaluating samples with questions and their corresponding answers.These prompted samples are utilized for further training of the model.In addition to fine-tuning, ChatGPT incorporates an additional training of a reward model.This reward model combines the question-answer pairs set by human experts with the model's predicted results and assigns reward scores accordingly, as shown in the following Eq 2: Here, θ r represents the parameters of the reward model.x denotes the prompt, while y w represents the preferred completion among the given alternatives in y l .D c denotes the dataset used for human expert comparisons.Based on the reward model, ChatGPT is fine-tuned using the Proximal Policy Optimization (PPO) strategy, ultimately completing the training of the final model.
There are several models available for text data augmentation [32][33][34].However, ChatGPT is particularly suitable for the data augmentation task in this study [35].This is because ChatGPT combines manually labeled training samples by human experts, resulting in generated content that is more genuine and aligned with human language conventions.Additionally, under the supervision of the reinforcement learning model, the generated content is more reliable and of higher quality.Furthermore, the training of ChatGPT based on a large-scale corpus enhances the diversity of data generation, which is beneficial for expanding the data in this study.Fig 4 presents a real case of text generation by ChatGPT, demonstrating its highquality output that ensures overall semantic fluency and naturalness of sentences, while also satisfying the diversity requirements of the data augmentation task.Based on ChatGPT, the algorithmic procedure for our data augmentation is outlined as this Algorithm 1.
Algorithm 1 The framework of ChatGPT for augmenting text in the original dataset.This paper [35] have employed cosine similarity and transRate to evaluate the quality of generated text.However, we argue that these approaches are not suitable for ABSA.Firstly, when proper prompts are provided and the generation process is carried out iteratively with a limited amount of text, ChatGPT exhibits commendable text generation quality.With the support of large language models, ChatGPT can creatively generate text based on the original input.It may produce text that meets the requirements of ABSA, but differs significantly in similarity to the original sentence.For example, it may change aspect words or alter sentence expressions, resulting in a low cosine similarity Table 3.Therefore, we adopt human expert to assess the quality of the generated text, as it provides a more reliable and accurate measure.To ensure the effectiveness of the augmented data and the feasibility for model training, we randomly selected 50 instances of generated data.These instances were then mixed with 50 instances of real data from the dataset.The combined set was distributed to five human experts specializing in ABSA for scoring tests.Each expert was required to assign a score ranging from -1 to 3 (integer values only) to indicate the suitability of each sentence for ABSA.The specific scoring rules were as Table 1.

Embedding module
The Embedding layer serves as the fundamental building block of the model architecture, and in this study, two methods are employed for text encoding.The first method leverages a Bi-LSTM to compute the textual representation by utilizing word vectors derived from the input text.Conversely, the second method incorporates the utilization of the pre-trained BERT model for text encoding.BERT utilizes a transformer structure, which encompasses a selfattention mechanism facilitating bidirectional information flow.By employing a Masked Language Model (MLM) during pre-training, BERT effectively considers both preceding and succeeding context, thereby comprehensively capturing semantic contexts and enhancing the accuracy of information extraction.
We map each word to an m-dimensional word embedding through an embedding table X 2 R m�jNj , resulting in an embedding matrix X ¼ ½x 1 ; x 2 ; . . .; x a 1 ; x a 2 ; . . .; x a k ; . . .; x n �.Here, x a i 2 R m represents the word embedding of the aspect term w a i .The dimensionality of the word vectors is denoted by m, n represents the sentence length, and |N| denotes the vocabulary size.We derive the embedding lookup table from pre-trained embeddings such as GloVe or BERT [36], and fine-tune it during the training process.CKG conducts experimental comparisons between the two approaches.The LSTM-based model demonstrates lower accuracy compared to BERT, but requires significantly less training time.On the other hand, the BERT-based model exhibits significantly improved accuracy at the cost of longer training time and higher computational expenses.

Knowledge-enhanced GCN with attention and gated skip-connection (GAGCN)
The graph structure incorporates syntactic encoding as input.To encode syntactic information, the SpaCy (The spaCy toolkit is used to parse the dependency tree of the sentence: https://spacy.io/.)dependency parser is used to compute syntactic dependencies.By providing the syntactic structure, we capture richer information about the sentence structure and construct the adjacency matrix D 2 R n�n according to Eq 3: To leverage the relationships between words, our graph structure adopts an undirected dependency graph.Inspired by [37], we enhance the adjacency matrix with sentiment information using SenticNet.First, we need to calculate the SenticNet scores between nodes, which can be represented by the following Eq 4: Where, SenticNet(w i , w j ) 2 [−2, 2] represents the combined sentiment score of w i and w j after being computed by SenticNet.This Eq 4 ensures that the model tends to favor words with higher sentiment scores, capturing more accurate sentiment polarity.It is worth noting that if w i does not appear in SenticNet or is a neutral word, SentNet(w i ) = 0. Next, based on the computed S ( i, j), we can enhance the previously constructed adjacency matrix with sentiment information using the following Eq 5: Using the adjacency matrixA i,j for syntactic encoding, GAGCN takes the input hidden state vectors H as initial node representations in the syntactic graph.Then, the GAGCN module obtains the graph representation of the syntax as H syn ¼ fh syn 1 ; h syn 2 ; . . .; h syn n g, where the symbol h syn i 2 R d u represents the hidden representation of the i-th node.The update equation for the representation of the i-th node in the l-th layer is as Eq 7: W l represents the weight matrix and symbol b l represents the bias term.For aspect nodes, we use the fh syn a 1 ; h syn a 2 ; . . .; h syn a n g to represent their hidden representations.F is the position-aware function referenced from [38], and θ denotes the relu activation function.Based on this equation, assuming there exists a node H l i in the l-th layer with three neighboring nodes H l 1 , H l 2 , and H l 3 , we can simplify and rewrite the above equation by omitting the bias term as Eq 8: Based on this equation, we introduce the attention mechanism as shown in the Fig 6 to update the node states as Eq 9: Where a l ij represents the attention score for the j-th node influencing the update of the i-th node in the l-th layer.The general attention calculation can be simply represented by the Eq 10: From the above equation, we can deduce the attention weights between each node and its neighboring nodes.However, for ABSA, inspired by [39], our focus should be on the influence of aspect terms on the sentence rather than the attention weights between adjacent nodes.Therefore, we can evaluate the attention coefficients by calculating the coupling between aspect terms and other words.
It is worth noting that Zhang in [38] employed Aspect-aware Attention to retrieve important features semantically related to the aspect terms from the hidden state vectors.Accordingly, attention weights based on retrieval were assigned to each context word.Inspired by this, we propose the aspect term weight anchoring method.This method utilizes aspect termspecific masking to mask out non-aspect words learned by the final GCN layer's output, while keeping the representation of aspect terms unchanged.This is done to construct our coupling matrix.Since we enhance aspect terms in the graph network with SenticNet, it is necessary to anchor the representation of aspect terms to prevent the model from weakening the sentiment representation of aspect terms during the training process.This is shown in the following equation: Where _ h i represents the representation of the i-th word obtained through GAGCN, ι is the starting index of the aspect term in the sentence, and l a is the length of the aspect term.From this, we can obtain the final representation of the anchored aspect term masking: Furthermore, we utilize a multi-head attention mechanism to describe the interactions between nodes using K different channels: As is well known, when multiple graph convolutional layers are added, the model can better understand long-distance information.However, issues such as gradient explosion may arise, which can impact the performance of the model.Therefore, we introduce a gate mechanism in skip connections to accurately propagate historical information when updating the hidden states, as shown in the Fig 7.This gate mechanism determines the forget rate and update rate, ensuring precise information transfer.
Finally, in order to effectively connect the semantic module and the syntactic module features and fully consider all information, we employ cross fusion [40] as the feature fusion method, calculated through the following equation: Where W 1 and W 2 are trainable parameters, and f represents the softmax activation function.
After this operation, both H syn 0 and H sem 0 fully consider the features of syntax and semantics.Then, the final fusion feature r is calculated by applying average pooling (ap) to these features:

Output layer
The CKG will extract features from the global structural information, semantic information, and the content of the target aspect.The final representation r is then sent to a linear layer and passed through the softmax function to generate the probability distribution y for the given aspect a: Here, W p and b p represent the learnable weights and biases, respectively.The function softmax () denotes the softmax function, which enables us to learn the final distribution of emotions as output.

Model training
We employ the standard gradient descent algorithm to optimize and update the parameters of the proposed model.The objective of training the model is to minimize the cross-entropy loss through L 2 regularization: Here, S represents the number of training samples, and C denotes the number of classes.ŷ represents the correct distribution of emotions.Θ signifies all trainable parameters.λ is the coefficient for the L 2 regularization term.

Experiments
In this section, we will introduce the dataset used to evaluate the model's performance, provide an overview of the experimental parameters, and conclude with a comparative analysis of the models.

Datasets and augmentation with ChatGPT
We trained and validated our model on five publicly available benchmark models: Twitter, proposed by Dong [41], which contains Twitter post data, and four others (LAP14, REST14, REST15, REST16) from the lap and restaurants domains of SemEval 2014 task 4 [42], the restaurants domain of SemEval 2015 task 12 [43], and the restaurants domain of SemEval 2016 task 5 [44].Based on these five datasets, we performed data augmentation operations of varying scales.The aim was to balance the distribution of different sentiment polarities and avoid data inconsistencies, thereby improving the training effectiveness and robustness of the model.Through the algorithm 1, we obtained the augmented datasets, as shown in Table 2. Table 3 presents examples of the augmented data.Upon observation, we found that the quality of the generated data is high, to the extent that aspect terms can be replaced without contradicting the final sentiment polarity.Table 3. Examples of the original text after data augmentation using ChatGPT is as follows.We implement the calculation of cosine similarity using the sklearn package [45].

Original Sentence Text augmented via ChatGPT Cosine Similarity
The plot of this movie is excellent.The cinematography of this movie is excellent, capturing the plot perfectly.

0.758
The character development in this movie is excellent, enhancing the overall plot.

0.571
The pacing of this movie is excellent, keeping the plot engaging from start to finish.

0.619
The service at this restaurant is terrible, but the food is delicious.
Despite the terrible service, the ambiance and decor of this restaurant create a pleasant dining experience.

0.323
While the service may be lacking, the presentation of the food is exceptional and adds to the overall dining experience.

0.384
Although the service leaves much to be desired, the extensive menu and the quality of the food make up for it.

0.286
The screen of this phone is clear, but the performance and battery life are disappointing.
Despite the disappointing performance and battery life, the clear screen of this phone provides an enjoyable visual experience.

0.617
The screen clarity of this phone is commendable, but the disappointing performance and battery life hinder the overall user experience.

0.692
While the screen is clear and vibrant, the disappointing performance and short battery life limit the phone's functionality.In order to evaluate the suitability of the generated samples for ABSA tasks, we conducted an evaluation of the generated data based on the assessment rules outlined in section 3.3, which is shown in Table 1.Both the original samples and the generated samples were randomly selected and mixed in a shuffled manner.Five human experts were tasked with scoring each sample based on the specified criteria.The scoring results are presented in the Fig 8.
From Fig 8, it is evident that the majority of human experts considered these data to meet the requirements of ABSA.These 100 samples were a combination of real and generated data, further demonstrating the effectiveness of data augmentation using ChatGPT for training models in ABSA.Interestingly, certain experts assigned scores of -1, 0, and 2 to specific samples.We extracted these samples and compiled them in Table 4.

Sentence Score
The bookshelf sprouted wings and flew through the library, while the fish swam through the pages of a novel. -1 The pencil drew swirling galaxies, while the teacup recited mathematical equations in a hushed tone.0 The plot of this novel is so complex, it's as simple and understandable as a clear glass of water. 2 The quality of this product is truly indescribable, it's like a leaping deer, full of stability and reliability.2 The coffee mug floated through the sky, carrying dreams and memories on the wings of a butterfly.2 https://doi.org/10.1371/journal.pone.0301508.t004 Upon analyzing the original sentences, it becomes apparent that these sentences express abstract semantics or logic, making them less suitable for ABSA.However, they possess an artistic quality in terms of their sentence structure.After analysis and adjustment, we concluded that this discrepancy can be attributed to the "memory" function of ChatGPT, which requires further improvement.Generating the entire batch of texts at once can cause ChatGPT to "forget" the initial requirements.Therefore, it is advisable to generate the data in batches.Through our experiments, we found that controlling the number of generated texts to be within 20 entries or less yields better results.

Models for comparison
To evaluate the performance of our proposed CKG model, we compared it with other existing models: • SVM [46], a classical model used for addressing ABSA.
• TD-LSTM [3], a model that utilizes an improved version of recurrent neural networks to extract text features.
• MemNet [47], a model that explicitly considers contextual information and utilizes a memory network architecture.
• ATAE-LSTM [48], a model that introduces an aspect-sentence attention mechanism to incorporate aspects and sentences into LSTM, thereby effectively considering the crucial information in the text.
• IAN [4], a method that optimizes the attention mechanism by proposing an interactive attention mechanism, which takes into account the feature representation of aspect words and context, ensuring comprehensive consideration of both aspects in the text.
• GCAE [49], a model based on convolutional neural networks and gating mechanisms, selectively outputs sentiment features based on given aspects or entities.The model structure is lightweight and straightforward.
• ASGCN-DT [38], a model that constructs a directed graph based on dependency trees obtained from sentence analysis.It combines graph convolutional networks to extract syntactic features, thereby integrating semantic and dependency relationship analysis for sentiment information.
• ASGCN-DG [38], a model that shares the same core approach as ASGCN-DT but differs in the construction of the graph.Instead of a directed graph, ASGCN-DG utilizes an undirected graph.
• AOA [50], a model that introduces an attention-over-attention mechanism to learn the interaction between aspect words and sentences, focusing on the important parts of the sentence that have a significant impact on the overall sentiment.
• TransCap [9], a model that introduces a transfer capsule network.It leverages aspect routing methods to encapsulate sentence-level semantic representations from aspect-level and document-level data into semantic capsules, thus enhancing the influence of aspect sentiment on semantics.
• BERT [36], an application of the original BERT model in ABSA, utilizing positional encoding as the input for text.
• MWGCN-BERT [52], a model that addresses the issue of long-distance dependencies by combining the LCG method to create a locally contextualized weighted adjacency graph.
• EK-GCN [53], a model that introduces external knowledge to compensate for the inability of syntactic dependency trees to capture fine-grained labels.It also designs a word-sentence interaction network that fully considers aspect information.
• Dual-GCN [54], an improved model that enhances the dependency parser and jointly considers both syntactic structure and semantic relevance.
• T-GCN [55], a method that explicitly leverages dependency types in ABSA using a typeaware graph convolutional network.It utilizes attention to differentiate between different edges in the graph.
• Sentic-GCN [23], a model that incorporates SenticNet to enhance the dependency graph, considering the dependency relationship between contextual words and aspect words, as well as the sentiment information between opinion words and aspect words.
• KGAN [21], proposes a knowledge graph attention network that utilizes a hierarchical fusion module to capture sentiment feature representations from multiple perspectives.

Evaluation metrics
The evaluation metrics for the model include Accuracy (Acc) and macro-averaged F1-score.
Accuracy is a commonly used evaluation measure, which represents the ratio of correctly predicted samples to the total number of samples.Macro-averaged F1-score (F1) is a performance metric for multi-class classification problems.It assesses the performance of the model for each individual class and calculates the average as an overall performance indicator for the model:

Overall performance comparison
We present the comparison results of our proposed CKG model with some existing excellent ABSA models in Table 5.The data used in the table is sourced from the reported results in the original papers.Any missing data is indicated with a "-".Based on the displayed results in the table, our model demonstrates excellent performance across all five datasets.Specifically, the traditional analytical methods exhibit relatively poorer performance.LSTM encoding methods improved with attention mechanisms show some enhancements, but they still fall short compared to models that incorporate GCN due to the absence of syntactic dependency knowledge.When we focus on the models that include GCN, we observe significant improvements in performance, particularly evident in the REST15 and REST16 datasets.
Compared to non-BERT-based baseline models, our model performs exceptionally well, reaffirming the effectiveness of our approach.Introducing the BERT-base semantic encoding module leads to significant improvements in our model compared to other models.Experimental results show that our model performs competitively, except for a relatively lower performance on the TWITTER dataset, outperforming the other four datasets.Overall, in ABSA tasks, the CKG+BERT model demonstrates outstanding performance.

Ablation study
To validate the effectiveness of each component in our proposed CKG model, we conducted ablation experiments and present the results in Table 6.We can observe that the models incorporating the "BERT" encoding consistently outperform those using "LSTM".Additionally, the models without attention or gate mechanisms exhibit unsatisfactory performance across all datasets, indicating the significant improvement in model performance with the inclusion of attention mechanisms and the gate-augmented GCN ("GAGCN") for regular GCN.Furthermore, it is noteworthy that models with only attention mechanisms or only gate mechanisms perform worse than the models that incorporate both.Based on the above analysis, we can conclude that our proposed enhancements effectively integrate semantic and syntactic features.The model, when combined with the sentiment knowledge base, demonstrates outstanding performance and merits attention in ABSA tasks.

Effect of the GCN layer number
The impact of the number of GCN layers on the focus of aspect features with varying degrees of local contextual information is often observed.We investigated the influence of the number of GCN layers on model performance, as shown in Fig 9 .The evaluation was conducted using ACC and F1 scores, with the GCN layers ranging from 1 to 7. We tested the models on the five https://doi.org/10.1371/journal.pone.0301508.g009datasets using either the BiLSTM with attention mechanism as the semantic module or the BERT-base encoding.The graph convolution modules used in this study were based on the proposed GAGCN network.
It is apparent that there exists a notable disparity in the outcomes when employing BERTbase as the semantic extraction module compared to the absence thereof.Under the same number of GCN layers, models using BERT-base as the encoding module outperform those using BiLSTM.When not using the BERT-base module, the model performs best with 1 to 2 GCN layers.One possible reason is that the dimensionality of the data encoded by BiLSTM is smaller, and GCN can learn the syntactic features with fewer layers.When BERT-base is used as the sentence encoding module, on the one hand, the model has a better understanding of semantics, and on the other hand, the input dimensionality of the syntax module is larger.Therefore, the model performs best with 3 to 4 GCN layers.One common observation for both encoding methods is that the model's performance tends to decline when the number of layers exceeds a certain threshold, indicating overfitting due to the complexity of the model.

Attention visualization
By visualizing the attention weights, we can intuitively observe how the CKG model focuses on different sentiment words to extract specific aspect-level sentiment features.As shown in Fig 10, darker colors indicate higher attention weights given by the model to those words.From the upper subgraph of Fig 10, we can observe that a general attention model exhibits some level of attention towards the aspect words in the sentence.However, it also assigns weights to other irrelevant words.Moreover, when there are multiple aspect words in a single sentence, the model fails to distinguish them significantly.On the other hand, the lower subgraph demonstrates that the CKG model, after adjustment, exhibits clear attention towards each aspect word and the corresponding words that influence the sentiment polarity.It assigns less attention to other words.Based on the aforementioned observations, it can be deduced that the model proposed in this study exhibits formidable prowess in addressing Aspect-Based Sentiment Analysis (ABSA) and presents commendable interpretability.

Case study
Through Table 7, we can observe the model's performance during actual predictions.Examples 1 to 3 are selected from the test set of the dataset, while examples 4 and 5 are commentlike statements generated by ChatGPT.By examining examples 1, 2, 4, and 5, we can see that our model accurately predicts the sentiment tendencies corresponding to different aspect words in sentences that contain multiple aspects.Additionally, our model demonstrates robustness by accurately predicting sentiment in the simulated comment-like statements that align with human conventions.Example 3 showcases our model's ability to accurately predict sentiment for aspect words associated with neutral emotions, further highlighting its excellent performance.

Conclusion
In this paper, we use ChatGPT to enhance text data and we modify the network architecture to improve the model's understanding of fine-grained emotions.Building upon the traditional "semantic & syntactic" analysis paradigm, we further improve it by introducing a cross-fusion mechanism that effectively integrates semantic and syntactic features.Additionally, we introduce a gated attention mechanism in the graph convolutional network to improve the performance of the syntactic feature extraction module and alleviate the potential issue of gradient explosion associated with multi-layer graph convolutions.We also incorporate an external

Input:
base dataset D and novel Dataset D n Output: D n Definition: POS, NEU, NEG 2 D represent the collections of texts in the original dataset labeled as positive, neutral, and negative, respectively, containing aspect words.α 2 POS, β 2 NEU, γ 2 NEG represent individual texts within these collections.count() denotes a

Fig 6 .
Fig 6.The arrows represent the information propagation between nodes, and the different colors of the arrows indicate the varying importance of adjacent nodes to the aspect term node a i .https://doi.org/10.1371/journal.pone.0301508.g006

Fig 8 .Table 4 .
Fig 8.The statistical representation of the scoring results by human experts.The experts (p1 to p5) are represented on the x-axis, while the y-axis represents the number of votes corresponding to each score level.Due to the significant disparity in the data distribution, we have applied the operation log(y) + 1 to the y-axis during plotting.However, the values indicated on the graph still represent the original y-values.https://doi.org/10.1371/journal.pone.0301508.g008

Fig 9 .
Fig 9.The ACC and F1 values obtained by training and testing with different CKG layer settings after applying ChatGPT data augmentation on the five datasets (Twitter, LAP14, REST14, REST15, and REST16).

Table 2 .
The data distribution of the dataset.Here, ")" represents data augmentation performed using ChatGPT.

Table 5 . Main experimental results of five datasets
. "Acc" represents accuracy, "F1" represents Macro-F1 score.The best results are shown in bold and second best underlined.The experimental results of other models are partly from the original paper and partly verified through reproducing the open-source code.

Table 6 . Experimental results of ablation study on four datasets
. "a" represents the addition of attention mechanism in the regular graph convolution, while "ga" represents the incorporation of both gate and attention mechanisms in the regular graph convolution. https://doi.org/10.1371/journal.pone.0301508.t006